1: | concat(leaf,Y) | → Y | |
2: | concat(cons(U,V),Y) | → cons(U,concat(V,Y)) | |
3: | lessleaves(X,leaf) | → false | |
4: | lessleaves(leaf,cons(W,Z)) | → true | |
5: | lessleaves(cons(U,V),cons(W,Z)) | → lessleaves(concat(U,V),concat(W,Z)) | |
6: | CONCAT(cons(U,V),Y) | → CONCAT(V,Y) | |
7: | LESSLEAVES(cons(U,V),cons(W,Z)) | → LESSLEAVES(concat(U,V),concat(W,Z)) | |
8: | LESSLEAVES(cons(U,V),cons(W,Z)) | → CONCAT(U,V) | |
9: | LESSLEAVES(cons(U,V),cons(W,Z)) | → CONCAT(W,Z) | |